<!-- 主界面侧边栏、顶部栏部分 -->
<template>
  <el-container style="min-height: 100vh;">

    <!--侧边栏-->
    <el-aside :width="sideWidth+'px'">
      <Aside :isCollapse="isCollapse" :logoTextshow="logoTextshow"></Aside>
    </el-aside>

    <el-container>

      <!--管理员(表头)信息-->
      <el-header style="border-bottom: 1px solid #ccc;">
        <Top :collapseBtnClass="collapseBtnClass" :collapse="collapse" :DisappearFont="DisappearFont"></Top>
      </el-header>

      <!--主体-->
      <el-main>
        <!--当前页面的子路由会在routervew里显示-->
        <router-view></router-view>
      </el-main>
    </el-container>

  </el-container>
</template>

<script>

import Aside from "@/components/Aside.vue";
import Top from "@/components/Top.vue";


export default {
  name: 'HomeView',
  components: {
    Aside,
    Top
  },
  data() {
    return {
      collapseBtnClass: 'el-icon-s-fold',
      isCollapse: false,
      sideWidth: 200,
      logoTextshow: true,
      DisappearFont: false,

    }
  },
  create() {

  },

  methods: {
    collapse() {
      this.isCollapse = !this.isCollapse;
      if (this.isCollapse) {
        this.sideWidth = 64
        this.collapseBtnClass = 'el-icon-s-unfold'
        this.logoTextshow = false
        this.DisappearFont = true
      } else {
        this.sideWidth = 200
        this.collapseBtnClass = 'el-icon-s-fold'
        this.logoTextshow = true
        this.DisappearFont = false
      }
    },
  }
}
</script>


